from .base import Base
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer
from sqlalchemy.databases.mysql import MSString

__all__ = ["Currency"]

class Currency(Base):
    __tablename__ = "currencies"
    
    id = Column(Integer, primary_key=True)
    code = Column(MSString(3), nullable=False)
    
    def __init__(self, code):
        self.code = code
        
    def __repr__(self):
        return "<Currency('%s')>" % self.code